# coding: utf-8

"""
    Firefly III API Client

    This is the Python client for Firefly III API  # noqa: E501

    The version of the OpenAPI document: 1.4.0
    Contact: james@firefly-iii.org
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from firefly_iii_client.configuration import Configuration


class RecurrenceTransaction(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'amount': 'str',
        'budget_id': 'int',
        'budget_name': 'str',
        'category_id': 'int',
        'category_name': 'str',
        'currency_code': 'str',
        'currency_decimal_places': 'int',
        'currency_id': 'int',
        'currency_symbol': 'str',
        'description': 'str',
        'destination_iban': 'str',
        'destination_id': 'int',
        'destination_name': 'str',
        'destination_type': 'AccountTypeProperty',
        'foreign_amount': 'str',
        'foreign_currency_code': 'str',
        'foreign_currency_decimal_places': 'int',
        'foreign_currency_id': 'int',
        'foreign_currency_symbol': 'str',
        'piggy_bank_id': 'int',
        'piggy_bank_name': 'str',
        'source_iban': 'str',
        'source_id': 'int',
        'source_name': 'str',
        'source_type': 'AccountTypeProperty',
        'tags': 'list[str]'
    }

    attribute_map = {
        'amount': 'amount',
        'budget_id': 'budget_id',
        'budget_name': 'budget_name',
        'category_id': 'category_id',
        'category_name': 'category_name',
        'currency_code': 'currency_code',
        'currency_decimal_places': 'currency_decimal_places',
        'currency_id': 'currency_id',
        'currency_symbol': 'currency_symbol',
        'description': 'description',
        'destination_iban': 'destination_iban',
        'destination_id': 'destination_id',
        'destination_name': 'destination_name',
        'destination_type': 'destination_type',
        'foreign_amount': 'foreign_amount',
        'foreign_currency_code': 'foreign_currency_code',
        'foreign_currency_decimal_places': 'foreign_currency_decimal_places',
        'foreign_currency_id': 'foreign_currency_id',
        'foreign_currency_symbol': 'foreign_currency_symbol',
        'piggy_bank_id': 'piggy_bank_id',
        'piggy_bank_name': 'piggy_bank_name',
        'source_iban': 'source_iban',
        'source_id': 'source_id',
        'source_name': 'source_name',
        'source_type': 'source_type',
        'tags': 'tags'
    }

    def __init__(self, amount=None, budget_id=None, budget_name=None, category_id=None, category_name=None, currency_code=None, currency_decimal_places=None, currency_id=None, currency_symbol=None, description=None, destination_iban=None, destination_id=None, destination_name=None, destination_type=None, foreign_amount=None, foreign_currency_code=None, foreign_currency_decimal_places=None, foreign_currency_id=None, foreign_currency_symbol=None, piggy_bank_id=None, piggy_bank_name=None, source_iban=None, source_id=None, source_name=None, source_type=None, tags=None, local_vars_configuration=None):  # noqa: E501
        """RecurrenceTransaction - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._amount = None
        self._budget_id = None
        self._budget_name = None
        self._category_id = None
        self._category_name = None
        self._currency_code = None
        self._currency_decimal_places = None
        self._currency_id = None
        self._currency_symbol = None
        self._description = None
        self._destination_iban = None
        self._destination_id = None
        self._destination_name = None
        self._destination_type = None
        self._foreign_amount = None
        self._foreign_currency_code = None
        self._foreign_currency_decimal_places = None
        self._foreign_currency_id = None
        self._foreign_currency_symbol = None
        self._piggy_bank_id = None
        self._piggy_bank_name = None
        self._source_iban = None
        self._source_id = None
        self._source_name = None
        self._source_type = None
        self._tags = None
        self.discriminator = None

        self.amount = amount
        if budget_id is not None:
            self.budget_id = budget_id
        self.budget_name = budget_name
        if category_id is not None:
            self.category_id = category_id
        if category_name is not None:
            self.category_name = category_name
        if currency_code is not None:
            self.currency_code = currency_code
        if currency_decimal_places is not None:
            self.currency_decimal_places = currency_decimal_places
        if currency_id is not None:
            self.currency_id = currency_id
        if currency_symbol is not None:
            self.currency_symbol = currency_symbol
        self.description = description
        self.destination_iban = destination_iban
        if destination_id is not None:
            self.destination_id = destination_id
        if destination_name is not None:
            self.destination_name = destination_name
        if destination_type is not None:
            self.destination_type = destination_type
        self.foreign_amount = foreign_amount
        self.foreign_currency_code = foreign_currency_code
        self.foreign_currency_decimal_places = foreign_currency_decimal_places
        self.foreign_currency_id = foreign_currency_id
        self.foreign_currency_symbol = foreign_currency_symbol
        if piggy_bank_id is not None:
            self.piggy_bank_id = piggy_bank_id
        if piggy_bank_name is not None:
            self.piggy_bank_name = piggy_bank_name
        self.source_iban = source_iban
        if source_id is not None:
            self.source_id = source_id
        if source_name is not None:
            self.source_name = source_name
        if source_type is not None:
            self.source_type = source_type
        self.tags = tags

    @property
    def amount(self):
        """Gets the amount of this RecurrenceTransaction.  # noqa: E501

        Amount of the transaction.  # noqa: E501

        :return: The amount of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """Sets the amount of this RecurrenceTransaction.

        Amount of the transaction.  # noqa: E501

        :param amount: The amount of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and amount is None:  # noqa: E501
            raise ValueError("Invalid value for `amount`, must not be `None`")  # noqa: E501

        self._amount = amount

    @property
    def budget_id(self):
        """Gets the budget_id of this RecurrenceTransaction.  # noqa: E501

        The budget ID for this transaction.  # noqa: E501

        :return: The budget_id of this RecurrenceTransaction.  # noqa: E501
        :rtype: int
        """
        return self._budget_id

    @budget_id.setter
    def budget_id(self, budget_id):
        """Sets the budget_id of this RecurrenceTransaction.

        The budget ID for this transaction.  # noqa: E501

        :param budget_id: The budget_id of this RecurrenceTransaction.  # noqa: E501
        :type: int
        """

        self._budget_id = budget_id

    @property
    def budget_name(self):
        """Gets the budget_name of this RecurrenceTransaction.  # noqa: E501

        The name of the budget to be used. If the budget name is unknown, the ID will be used or the value will be ignored.  # noqa: E501

        :return: The budget_name of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._budget_name

    @budget_name.setter
    def budget_name(self, budget_name):
        """Sets the budget_name of this RecurrenceTransaction.

        The name of the budget to be used. If the budget name is unknown, the ID will be used or the value will be ignored.  # noqa: E501

        :param budget_name: The budget_name of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """

        self._budget_name = budget_name

    @property
    def category_id(self):
        """Gets the category_id of this RecurrenceTransaction.  # noqa: E501

        Category ID for this transaction.  # noqa: E501

        :return: The category_id of this RecurrenceTransaction.  # noqa: E501
        :rtype: int
        """
        return self._category_id

    @category_id.setter
    def category_id(self, category_id):
        """Sets the category_id of this RecurrenceTransaction.

        Category ID for this transaction.  # noqa: E501

        :param category_id: The category_id of this RecurrenceTransaction.  # noqa: E501
        :type: int
        """

        self._category_id = category_id

    @property
    def category_name(self):
        """Gets the category_name of this RecurrenceTransaction.  # noqa: E501

        Category name for this transaction.  # noqa: E501

        :return: The category_name of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._category_name

    @category_name.setter
    def category_name(self, category_name):
        """Sets the category_name of this RecurrenceTransaction.

        Category name for this transaction.  # noqa: E501

        :param category_name: The category_name of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """

        self._category_name = category_name

    @property
    def currency_code(self):
        """Gets the currency_code of this RecurrenceTransaction.  # noqa: E501

        Submit either a currency_id or a currency_code.  # noqa: E501

        :return: The currency_code of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._currency_code

    @currency_code.setter
    def currency_code(self, currency_code):
        """Sets the currency_code of this RecurrenceTransaction.

        Submit either a currency_id or a currency_code.  # noqa: E501

        :param currency_code: The currency_code of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """

        self._currency_code = currency_code

    @property
    def currency_decimal_places(self):
        """Gets the currency_decimal_places of this RecurrenceTransaction.  # noqa: E501

        Number of decimals in the currency  # noqa: E501

        :return: The currency_decimal_places of this RecurrenceTransaction.  # noqa: E501
        :rtype: int
        """
        return self._currency_decimal_places

    @currency_decimal_places.setter
    def currency_decimal_places(self, currency_decimal_places):
        """Sets the currency_decimal_places of this RecurrenceTransaction.

        Number of decimals in the currency  # noqa: E501

        :param currency_decimal_places: The currency_decimal_places of this RecurrenceTransaction.  # noqa: E501
        :type: int
        """

        self._currency_decimal_places = currency_decimal_places

    @property
    def currency_id(self):
        """Gets the currency_id of this RecurrenceTransaction.  # noqa: E501

        Submit either a currency_id or a currency_code.  # noqa: E501

        :return: The currency_id of this RecurrenceTransaction.  # noqa: E501
        :rtype: int
        """
        return self._currency_id

    @currency_id.setter
    def currency_id(self, currency_id):
        """Sets the currency_id of this RecurrenceTransaction.

        Submit either a currency_id or a currency_code.  # noqa: E501

        :param currency_id: The currency_id of this RecurrenceTransaction.  # noqa: E501
        :type: int
        """

        self._currency_id = currency_id

    @property
    def currency_symbol(self):
        """Gets the currency_symbol of this RecurrenceTransaction.  # noqa: E501


        :return: The currency_symbol of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._currency_symbol

    @currency_symbol.setter
    def currency_symbol(self, currency_symbol):
        """Sets the currency_symbol of this RecurrenceTransaction.


        :param currency_symbol: The currency_symbol of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """

        self._currency_symbol = currency_symbol

    @property
    def description(self):
        """Gets the description of this RecurrenceTransaction.  # noqa: E501


        :return: The description of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this RecurrenceTransaction.


        :param description: The description of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and description is None:  # noqa: E501
            raise ValueError("Invalid value for `description`, must not be `None`")  # noqa: E501

        self._description = description

    @property
    def destination_iban(self):
        """Gets the destination_iban of this RecurrenceTransaction.  # noqa: E501


        :return: The destination_iban of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._destination_iban

    @destination_iban.setter
    def destination_iban(self, destination_iban):
        """Sets the destination_iban of this RecurrenceTransaction.


        :param destination_iban: The destination_iban of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """

        self._destination_iban = destination_iban

    @property
    def destination_id(self):
        """Gets the destination_id of this RecurrenceTransaction.  # noqa: E501

        ID of the destination account. Submit either this or destination_name.  # noqa: E501

        :return: The destination_id of this RecurrenceTransaction.  # noqa: E501
        :rtype: int
        """
        return self._destination_id

    @destination_id.setter
    def destination_id(self, destination_id):
        """Sets the destination_id of this RecurrenceTransaction.

        ID of the destination account. Submit either this or destination_name.  # noqa: E501

        :param destination_id: The destination_id of this RecurrenceTransaction.  # noqa: E501
        :type: int
        """

        self._destination_id = destination_id

    @property
    def destination_name(self):
        """Gets the destination_name of this RecurrenceTransaction.  # noqa: E501

        Name of the destination account. Submit either this or destination_id.  # noqa: E501

        :return: The destination_name of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._destination_name

    @destination_name.setter
    def destination_name(self, destination_name):
        """Sets the destination_name of this RecurrenceTransaction.

        Name of the destination account. Submit either this or destination_id.  # noqa: E501

        :param destination_name: The destination_name of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """

        self._destination_name = destination_name

    @property
    def destination_type(self):
        """Gets the destination_type of this RecurrenceTransaction.  # noqa: E501


        :return: The destination_type of this RecurrenceTransaction.  # noqa: E501
        :rtype: AccountTypeProperty
        """
        return self._destination_type

    @destination_type.setter
    def destination_type(self, destination_type):
        """Sets the destination_type of this RecurrenceTransaction.


        :param destination_type: The destination_type of this RecurrenceTransaction.  # noqa: E501
        :type: AccountTypeProperty
        """

        self._destination_type = destination_type

    @property
    def foreign_amount(self):
        """Gets the foreign_amount of this RecurrenceTransaction.  # noqa: E501

        Foreign amount of the transaction.  # noqa: E501

        :return: The foreign_amount of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._foreign_amount

    @foreign_amount.setter
    def foreign_amount(self, foreign_amount):
        """Sets the foreign_amount of this RecurrenceTransaction.

        Foreign amount of the transaction.  # noqa: E501

        :param foreign_amount: The foreign_amount of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """

        self._foreign_amount = foreign_amount

    @property
    def foreign_currency_code(self):
        """Gets the foreign_currency_code of this RecurrenceTransaction.  # noqa: E501

        Submit either a foreign_currency_id or a foreign_currency_code, or neither.  # noqa: E501

        :return: The foreign_currency_code of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._foreign_currency_code

    @foreign_currency_code.setter
    def foreign_currency_code(self, foreign_currency_code):
        """Sets the foreign_currency_code of this RecurrenceTransaction.

        Submit either a foreign_currency_id or a foreign_currency_code, or neither.  # noqa: E501

        :param foreign_currency_code: The foreign_currency_code of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """

        self._foreign_currency_code = foreign_currency_code

    @property
    def foreign_currency_decimal_places(self):
        """Gets the foreign_currency_decimal_places of this RecurrenceTransaction.  # noqa: E501

        Number of decimals in the currency  # noqa: E501

        :return: The foreign_currency_decimal_places of this RecurrenceTransaction.  # noqa: E501
        :rtype: int
        """
        return self._foreign_currency_decimal_places

    @foreign_currency_decimal_places.setter
    def foreign_currency_decimal_places(self, foreign_currency_decimal_places):
        """Sets the foreign_currency_decimal_places of this RecurrenceTransaction.

        Number of decimals in the currency  # noqa: E501

        :param foreign_currency_decimal_places: The foreign_currency_decimal_places of this RecurrenceTransaction.  # noqa: E501
        :type: int
        """

        self._foreign_currency_decimal_places = foreign_currency_decimal_places

    @property
    def foreign_currency_id(self):
        """Gets the foreign_currency_id of this RecurrenceTransaction.  # noqa: E501

        Submit either a foreign_currency_id or a foreign_currency_code, or neither.  # noqa: E501

        :return: The foreign_currency_id of this RecurrenceTransaction.  # noqa: E501
        :rtype: int
        """
        return self._foreign_currency_id

    @foreign_currency_id.setter
    def foreign_currency_id(self, foreign_currency_id):
        """Sets the foreign_currency_id of this RecurrenceTransaction.

        Submit either a foreign_currency_id or a foreign_currency_code, or neither.  # noqa: E501

        :param foreign_currency_id: The foreign_currency_id of this RecurrenceTransaction.  # noqa: E501
        :type: int
        """

        self._foreign_currency_id = foreign_currency_id

    @property
    def foreign_currency_symbol(self):
        """Gets the foreign_currency_symbol of this RecurrenceTransaction.  # noqa: E501


        :return: The foreign_currency_symbol of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._foreign_currency_symbol

    @foreign_currency_symbol.setter
    def foreign_currency_symbol(self, foreign_currency_symbol):
        """Sets the foreign_currency_symbol of this RecurrenceTransaction.


        :param foreign_currency_symbol: The foreign_currency_symbol of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """

        self._foreign_currency_symbol = foreign_currency_symbol

    @property
    def piggy_bank_id(self):
        """Gets the piggy_bank_id of this RecurrenceTransaction.  # noqa: E501

        Optional. Use either this or the piggy_bank_name  # noqa: E501

        :return: The piggy_bank_id of this RecurrenceTransaction.  # noqa: E501
        :rtype: int
        """
        return self._piggy_bank_id

    @piggy_bank_id.setter
    def piggy_bank_id(self, piggy_bank_id):
        """Sets the piggy_bank_id of this RecurrenceTransaction.

        Optional. Use either this or the piggy_bank_name  # noqa: E501

        :param piggy_bank_id: The piggy_bank_id of this RecurrenceTransaction.  # noqa: E501
        :type: int
        """

        self._piggy_bank_id = piggy_bank_id

    @property
    def piggy_bank_name(self):
        """Gets the piggy_bank_name of this RecurrenceTransaction.  # noqa: E501

        Optional. Use either this or the piggy_bank_id  # noqa: E501

        :return: The piggy_bank_name of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._piggy_bank_name

    @piggy_bank_name.setter
    def piggy_bank_name(self, piggy_bank_name):
        """Sets the piggy_bank_name of this RecurrenceTransaction.

        Optional. Use either this or the piggy_bank_id  # noqa: E501

        :param piggy_bank_name: The piggy_bank_name of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """

        self._piggy_bank_name = piggy_bank_name

    @property
    def source_iban(self):
        """Gets the source_iban of this RecurrenceTransaction.  # noqa: E501


        :return: The source_iban of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._source_iban

    @source_iban.setter
    def source_iban(self, source_iban):
        """Sets the source_iban of this RecurrenceTransaction.


        :param source_iban: The source_iban of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """

        self._source_iban = source_iban

    @property
    def source_id(self):
        """Gets the source_id of this RecurrenceTransaction.  # noqa: E501

        ID of the source account. Submit either this or source_name.  # noqa: E501

        :return: The source_id of this RecurrenceTransaction.  # noqa: E501
        :rtype: int
        """
        return self._source_id

    @source_id.setter
    def source_id(self, source_id):
        """Sets the source_id of this RecurrenceTransaction.

        ID of the source account. Submit either this or source_name.  # noqa: E501

        :param source_id: The source_id of this RecurrenceTransaction.  # noqa: E501
        :type: int
        """

        self._source_id = source_id

    @property
    def source_name(self):
        """Gets the source_name of this RecurrenceTransaction.  # noqa: E501

        Name of the source account. Submit either this or source_id.  # noqa: E501

        :return: The source_name of this RecurrenceTransaction.  # noqa: E501
        :rtype: str
        """
        return self._source_name

    @source_name.setter
    def source_name(self, source_name):
        """Sets the source_name of this RecurrenceTransaction.

        Name of the source account. Submit either this or source_id.  # noqa: E501

        :param source_name: The source_name of this RecurrenceTransaction.  # noqa: E501
        :type: str
        """

        self._source_name = source_name

    @property
    def source_type(self):
        """Gets the source_type of this RecurrenceTransaction.  # noqa: E501


        :return: The source_type of this RecurrenceTransaction.  # noqa: E501
        :rtype: AccountTypeProperty
        """
        return self._source_type

    @source_type.setter
    def source_type(self, source_type):
        """Sets the source_type of this RecurrenceTransaction.


        :param source_type: The source_type of this RecurrenceTransaction.  # noqa: E501
        :type: AccountTypeProperty
        """

        self._source_type = source_type

    @property
    def tags(self):
        """Gets the tags of this RecurrenceTransaction.  # noqa: E501

        Array of tags.  # noqa: E501

        :return: The tags of this RecurrenceTransaction.  # noqa: E501
        :rtype: list[str]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this RecurrenceTransaction.

        Array of tags.  # noqa: E501

        :param tags: The tags of this RecurrenceTransaction.  # noqa: E501
        :type: list[str]
        """

        self._tags = tags

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, RecurrenceTransaction):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, RecurrenceTransaction):
            return True

        return self.to_dict() != other.to_dict()
